﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
using System.Data;

namespace CSP.Dao.CommonDao
{
    public class CSPBBSCommonDao
    {

        /// <summary>
        /// 获取Sql 执行参数
        /// </summary>
        /// <param name="name"></param>
        /// <param name="dbType"></param>
        /// <param name="size"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        protected MySqlParameter GetParameter(string name, DbType dbType, int size, object value)
        {
            MySqlParameter parm = new MySqlParameter();
            parm.DbType = dbType;
            parm.ParameterName = name;
            parm.Value = value;
            parm.Size = size;

            return parm;
        }

        /// <summary>
        /// 获取Sql 执行参数
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        protected MySqlParameter GetParameter(string name, object value)
        {
            MySqlParameter parm = new MySqlParameter();
            parm.ParameterName = name;
            parm.Value = value;

            return parm;
        }

        public void Dispose()
        {

        }
    }
}
